.class public Les/ex;
.super Lcom/estrongs/android/view/h0;
.source "DownloadProgressView.java"


# instance fields
.field e:Z

.field private f:I

.field public final g:Landroid/os/Handler;

.field public final h:Les/w80;

.field private i:Landroid/widget/ProgressBar;

.field public j:Landroid/widget/TextView;

.field public k:Landroid/widget/TextView;

.field public l:Landroid/widget/TextView;

.field public m:Landroid/widget/TextView;

.field private n:J

.field private o:J

.field private p:Ljava/lang/String;

.field private q:Z

.field private r:J

.field private s:J

.field private t:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/app/Activity;Landroid/view/ViewGroup;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, v0}, Les/ex;-><init>(Landroid/app/Activity;Landroid/view/ViewGroup;Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Landroid/app/Activity;Landroid/view/ViewGroup;Ljava/lang/String;)V
    .locals 3

    const/4 v0, 0x0

    const/4 v1, 0x1

    if-nez p2, :cond_0

    const/4 v2, 0x1

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    .line 2
    :goto_0
    invoke-direct {p0, p1, p2, v2}, Lcom/estrongs/android/view/h0;-><init>(Landroid/content/Context;Landroid/view/ViewGroup;Z)V

    .line 3
    iput-boolean v1, p0, Les/ex;->e:Z

    .line 4
    iput v1, p0, Les/ex;->f:I

    .line 5
    new-instance p1, Les/ex$a;

    invoke-direct {p1, p0}, Les/ex$a;-><init>(Les/ex;)V

    iput-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    .line 6
    new-instance p1, Les/ex$b;

    invoke-direct {p1, p0}, Les/ex$b;-><init>(Les/ex;)V

    iput-object p1, p0, Les/ex;->h:Les/w80;

    const-wide/16 p1, 0x0

    .line 7
    iput-wide p1, p0, Les/ex;->n:J

    .line 8
    iput-wide p1, p0, Les/ex;->o:J

    const/4 p1, 0x0

    .line 9
    iput-object p1, p0, Les/ex;->t:Ljava/lang/String;

    const p1, 0x7f090938

    .line 10
    invoke-virtual {p0, p1}, Lcom/estrongs/android/view/h0;->b(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/ex;->j:Landroid/widget/TextView;

    const p1, 0x7f090931

    .line 11
    invoke-virtual {p0, p1}, Lcom/estrongs/android/view/h0;->b(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ProgressBar;

    iput-object p1, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const p1, 0x7f09093a

    .line 12
    invoke-virtual {p0, p1}, Lcom/estrongs/android/view/h0;->b(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/ex;->k:Landroid/widget/TextView;

    const p1, 0x7f090933

    .line 13
    invoke-virtual {p0, p1}, Lcom/estrongs/android/view/h0;->b(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/ex;->l:Landroid/widget/TextView;

    const p1, 0x7f09093c

    .line 14
    invoke-virtual {p0, p1}, Lcom/estrongs/android/view/h0;->b(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/ex;->m:Landroid/widget/TextView;

    if-eqz p3, :cond_1

    .line 15
    iput-boolean v1, p0, Les/ex;->q:Z

    .line 16
    iget-object p1, p0, Les/ex;->j:Landroid/widget/TextView;

    invoke-virtual {p1, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 17
    iget-object p1, p0, Les/ex;->j:Landroid/widget/TextView;

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setSingleLine(Z)V

    :cond_1
    return-void
.end method

.method private a(JJ)D
    .locals 3

    const-wide/16 v0, 0x0

    cmp-long v2, p3, v0

    if-nez v2, :cond_0

    const-wide/high16 p1, 0x3ff0000000000000L    # 1.0

    return-wide p1

    :cond_0
    cmp-long v0, p1, p3

    if-ltz v0, :cond_1

    const-wide/high16 p1, 0x4059000000000000L    # 100.0

    return-wide p1

    :cond_1
    long-to-float p1, p1

    long-to-float p2, p3

    div-float/2addr p1, p2

    const/high16 p2, 0x42c80000    # 100.0f

    mul-float p1, p1, p2

    .line 7
    new-instance p2, Ljava/math/BigDecimal;

    float-to-double p3, p1

    invoke-direct {p2, p3, p4}, Ljava/math/BigDecimal;-><init>(D)V

    const/4 p1, 0x2

    const/4 p3, 0x4

    .line 8
    invoke-virtual {p2, p1, p3}, Ljava/math/BigDecimal;->setScale(II)Ljava/math/BigDecimal;

    move-result-object p1

    invoke-virtual {p1}, Ljava/math/BigDecimal;->doubleValue()D

    move-result-wide p1

    return-wide p1
.end method

.method private a(Landroid/widget/TextView;Ljava/lang/String;)V
    .locals 0

    if-eqz p1, :cond_0

    .line 9
    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method static synthetic a(Les/ex;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/ex;->s()V

    return-void
.end method

.method static synthetic a(Les/ex;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Les/ex;->q:Z

    return p1
.end method

.method static synthetic b(Les/ex;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/ex;->t()V

    return-void
.end method

.method static synthetic c(Les/ex;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/ex;->u()V

    return-void
.end method

.method static synthetic d(Les/ex;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Les/ex;->q:Z

    return p0
.end method

.method static synthetic e(Les/ex;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Les/ex;->p:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic f(Les/ex;)Landroid/widget/ProgressBar;
    .locals 0

    .line 1
    iget-object p0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    return-object p0
.end method

.method static synthetic g(Les/ex;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/ex;->q()V

    return-void
.end method

.method static synthetic h(Les/ex;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/ex;->r()V

    return-void
.end method

.method static synthetic i(Les/ex;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/view/h0;->a:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic j(Les/ex;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/view/h0;->a:Landroid/content/Context;

    return-object p0
.end method

.method private q()V
    .locals 5

    .line 1
    iget-boolean v0, p0, Les/ex;->e:Z

    if-eqz v0, :cond_0

    iget-wide v0, p0, Les/ex;->r:J

    invoke-static {v0, v1}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_0
    iget-wide v0, p0, Les/ex;->r:J

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    .line 2
    :goto_0
    iget-object v1, p0, Les/ex;->m:Landroid/widget/TextView;

    if-eqz v1, :cond_1

    .line 3
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 4
    :cond_1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 5
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 6
    iget-wide v0, p0, Les/ex;->r:J

    const-wide/32 v2, 0x7fffffff

    cmp-long v4, v0, v2

    if-lez v4, :cond_2

    const/16 v0, 0x64

    .line 7
    iput v0, p0, Les/ex;->f:I

    .line 8
    :cond_2
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    iget-wide v1, p0, Les/ex;->r:J

    long-to-int v2, v1

    iget v1, p0, Les/ex;->f:I

    div-int/2addr v2, v1

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setMax(I)V

    return-void
.end method

.method private r()V
    .locals 5

    .line 1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    iget-wide v1, p0, Les/ex;->s:J

    long-to-int v2, v1

    iget v1, p0, Les/ex;->f:I

    div-int/2addr v2, v1

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setProgress(I)V

    .line 2
    iget-object v0, p0, Les/ex;->l:Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 3
    iget-boolean v1, p0, Les/ex;->e:Z

    if-eqz v1, :cond_0

    iget-wide v1, p0, Les/ex;->s:J

    invoke-static {v1, v2}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_0
    iget-wide v1, p0, Les/ex;->s:J

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v1

    :goto_0
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 4
    :cond_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-wide v1, p0, Les/ex;->s:J

    iget-wide v3, p0, Les/ex;->r:J

    invoke-direct {p0, v1, v2, v3, v4}, Les/ex;->a(JJ)D

    move-result-wide v1

    double-to-int v1, v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "%"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 5
    iget-object v1, p0, Les/ex;->k:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method private s()V
    .locals 5

    .line 1
    iget-boolean v0, p0, Les/ex;->e:Z

    if-eqz v0, :cond_0

    iget-wide v0, p0, Les/ex;->n:J

    invoke-static {v0, v1}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_0
    iget-wide v0, p0, Les/ex;->n:J

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    .line 2
    :goto_0
    iget-object v1, p0, Les/ex;->m:Landroid/widget/TextView;

    if-eqz v1, :cond_1

    .line 3
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 4
    :cond_1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 5
    iget-wide v0, p0, Les/ex;->n:J

    const-wide/32 v2, 0x7fffffff

    cmp-long v4, v0, v2

    if-lez v4, :cond_2

    const/16 v0, 0x64

    .line 6
    iput v0, p0, Les/ex;->f:I

    .line 7
    :cond_2
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    iget-wide v1, p0, Les/ex;->n:J

    long-to-int v2, v1

    iget v1, p0, Les/ex;->f:I

    div-int/2addr v2, v1

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setMax(I)V

    return-void
.end method

.method private t()V
    .locals 6

    .line 1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    iget-wide v1, p0, Les/ex;->o:J

    long-to-int v2, v1

    iget v1, p0, Les/ex;->f:I

    div-int/2addr v2, v1

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setProgress(I)V

    .line 2
    iget-object v0, p0, Les/ex;->l:Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 3
    iget-boolean v1, p0, Les/ex;->e:Z

    if-eqz v1, :cond_0

    iget-wide v1, p0, Les/ex;->o:J

    invoke-static {v1, v2}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_0
    iget-wide v1, p0, Les/ex;->o:J

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v1

    :goto_0
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 4
    :cond_1
    iget-object v0, p0, Les/ex;->t:Ljava/lang/String;

    invoke-static {v0}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 5
    iget-object v0, p0, Les/ex;->k:Landroid/widget/TextView;

    iget-object v1, p0, Les/ex;->t:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 6
    :cond_2
    iget-object v0, p0, Les/ex;->k:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-wide v2, p0, Les/ex;->o:J

    iget-wide v4, p0, Les/ex;->n:J

    invoke-direct {p0, v2, v3, v4, v5}, Les/ex;->a(JJ)D

    move-result-wide v2

    double-to-int v2, v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "%"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_1
    return-void
.end method

.method private u()V
    .locals 0

    return-void
.end method


# virtual methods
.method protected a(Les/w80$a;)Ljava/lang/String;
    .locals 0

    const p0, 0x0

    throw p0
.end method

.method public a(J)V
    .locals 0

    .line 5
    iput-wide p1, p0, Les/ex;->r:J

    .line 6
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 p2, 0x7

    invoke-virtual {p1, p2}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 1

    .line 3
    iput-object p1, p0, Les/ex;->p:Ljava/lang/String;

    .line 4
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 v0, 0x5

    invoke-virtual {p1, v0}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public b(J)V
    .locals 0

    .line 2
    iput-wide p1, p0, Les/ex;->s:J

    .line 3
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/16 p2, 0x8

    invoke-virtual {p1, p2}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public b(Ljava/lang/String;)V
    .locals 0

    .line 4
    iput-object p1, p0, Les/ex;->t:Ljava/lang/String;

    return-void
.end method

.method public c(J)V
    .locals 0

    .line 2
    iput-wide p1, p0, Les/ex;->n:J

    .line 3
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 p2, 0x1

    invoke-virtual {p1, p2}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public c(Ljava/lang/String;)V
    .locals 1

    .line 4
    iput-object p1, p0, Les/ex;->p:Ljava/lang/String;

    .line 5
    iget-object v0, p0, Les/ex;->j:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public d(J)V
    .locals 0

    .line 2
    iput-wide p1, p0, Les/ex;->o:J

    .line 3
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 p2, 0x4

    invoke-virtual {p1, p2}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public e(I)V
    .locals 1

    .line 2
    iget-object p1, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 v0, 0x3

    invoke-virtual {p1, v0}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public e(J)V
    .locals 0

    .line 3
    iput-wide p1, p0, Les/ex;->n:J

    .line 4
    invoke-direct {p0}, Les/ex;->s()V

    return-void
.end method

.method public f(J)V
    .locals 0

    .line 2
    iput-wide p1, p0, Les/ex;->o:J

    .line 3
    invoke-direct {p0}, Les/ex;->t()V

    return-void
.end method

.method public l()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method

.method public m()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/ex;->g:Landroid/os/Handler;

    const/4 v1, 0x6

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    return-void
.end method

.method public n()V
    .locals 4

    const-wide/16 v0, 0x0

    .line 1
    iput-wide v0, p0, Les/ex;->n:J

    .line 2
    iput-wide v0, p0, Les/ex;->o:J

    const/4 v2, 0x0

    .line 3
    iput-object v2, p0, Les/ex;->p:Ljava/lang/String;

    const/4 v3, 0x0

    .line 4
    iput-boolean v3, p0, Les/ex;->q:Z

    .line 5
    iput-wide v0, p0, Les/ex;->r:J

    .line 6
    iput-wide v0, p0, Les/ex;->s:J

    .line 7
    iput-object v2, p0, Les/ex;->t:Ljava/lang/String;

    .line 8
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 9
    iget-object v0, p0, Les/ex;->m:Landroid/widget/TextView;

    invoke-direct {p0, v0, v2}, Les/ex;->a(Landroid/widget/TextView;Ljava/lang/String;)V

    .line 10
    iget-object v0, p0, Les/ex;->l:Landroid/widget/TextView;

    invoke-direct {p0, v0, v2}, Les/ex;->a(Landroid/widget/TextView;Ljava/lang/String;)V

    .line 11
    iget-object v0, p0, Les/ex;->k:Landroid/widget/TextView;

    invoke-direct {p0, v0, v2}, Les/ex;->a(Landroid/widget/TextView;Ljava/lang/String;)V

    .line 12
    iget-object v0, p0, Les/ex;->j:Landroid/widget/TextView;

    invoke-direct {p0, v0, v2}, Les/ex;->a(Landroid/widget/TextView;Ljava/lang/String;)V

    return-void
.end method

.method public o()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    return-void
.end method

.method public p()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/ex;->i:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method
